﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<header>
 <link href="@Url.Content("~/Content/Style.css")" rel="stylesheet" type="text/css" />
 <script language="javascript" type="text/javascript">
     function checking() {
         var text_string = "";
         $('#da :checked').each(function () {
             text_string +=" "+$(this).val();
         });
         $("#txt").val(text_string);
  }
 </script>
 </header>
<body>
    <div class="content">
        <div class="content_resize">
            <div class="">
                @model List<KhaoSatSinhVienTotNghiep.Model.CauHoi>
                <h2 style="text-align: center;">
                    Tạo phiếu khảo sát</h2>
                <hr style="margin-bottom: 20px;" />
                @using (Html.BeginForm("ThemPhieuKhaoSat", "PhieuKhaoSat"))
                {
                    <table>
                     <tr>
                            <td colspan=2 style="text-align:center;">
                               <h2> Nhập vào Đợt khảo sát</h2>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="padding-left:100px;">
                                    Tên phiếu khảo sát :</div>
                            </td>
                            <td>
                                @Html.TextArea("TenDotKS", new { style="width:500px;margin-bottom:20px;"})
                            </td>
                        </tr>

                         <tr>
                            <td colspan=2 style="text-align:center;">
                               <h2> Chọn câu hỏi cho đợt khảo sát</h2>
                            </td>
                        </tr>
                        @for (int i = 0; i < Model.Count; i++ )
                        {
                            var item = Model[i];
                            string s = "name" + i;
                            <tr id="da">
                                <td  style="padding-left:100px;" >
                                    <input type="checkbox" value="@item.MaCauHoi" name="@s" style="margin-left:100px;"/>
                                </td>
                                <td>
                                    <p style="margin: 0px 50px 0px 0px; padding: 0px;">
                                        @item.ChiTiet</p>
                                </td>
                            </tr>
                        }
                        <tr>
                            <td>
                         
                            <input type="text" id="txt" name="cauh"  style="visibility:hidden;" /></td>
                            <td>
                                <input type="submit" name="OK" value="Tạo Phiếu" style="margin-left: 300px; margin-top: 50px;" onclick="checking();"/>
                            </td>
                        </tr>
                    </table>
                }
            </div>
           
            <div class="clr">
            </div>
        </div>
    </div>
</body>
